﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ServiceModel.DomainServices.Client;

namespace Candy.Model
{
    public class CandyInvokeOperation : CandyOperationBase
    {
        public CandyInvokeOperation(InvokeOperation io)
            : base(io)
        {

        }

        public CandyInvokeOperation(Exception error)
            : base(error)
        {

        }
    }

    public class CandyInvokeOperation<T> : CandyInvokeOperation
    {
        public CandyInvokeOperation(InvokeOperation<T> io)
            : base(io)
        {
            Value = io.Value;
        }

        public CandyInvokeOperation(Exception error)
            : base(error)
        {
            Value = default(T);
        }

        public CandyInvokeOperation(T value) : this((Exception) null)
        {
            Value = value;
        }

        public T Value { get; private set; }

    } 
}
